<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add/Update item</title>
</head>
<body>
<f:view>
 	<h:form>
 		<h:panelGrid columns="1" border="1">
			<h:panelGrid columns="2" >
				<h:outputLabel value="ID"></h:outputLabel>
				<h:inputText value="#{poiEditor.updLocationID}" readonly="true"></h:inputText>
				<h:outputLabel value="Name"></h:outputLabel>
				<h:inputText  value="#{poiEditor.updLocationName}"></h:inputText>
				<h:outputLabel value="Type"></h:outputLabel>
				<h:selectOneMenu id="poiType" value="#{poiEditor.updLocationType}" title="Select POI type">
  					<f:selectItem id="poiMy" itemLabel="My" itemValue="My" />
  					<f:selectItem id="poiStore" itemLabel="Store" itemValue="Store" />
  					<f:selectItem id="poiRecreation" itemLabel="Recreation" itemValue="Recreation" />
  					<f:selectItem id="poiFood" itemLabel="Food" itemValue="Food" />
				</h:selectOneMenu>
				<h:outputLabel value="Latitude"></h:outputLabel>
				<h:inputText  value="#{poiEditor.updLatitude}"></h:inputText>
				<h:outputLabel value="Longtitde"></h:outputLabel>
				<h:inputText  value="#{poiEditor.updLongitude}"></h:inputText>
			</h:panelGrid>
		</h:panelGrid>
		<br/>
		<h:commandButton action="#{poiEditor.addItem}" value="#{poiEditor.newRecord}" disabled="false"></h:commandButton>
	</h:form>
</f:view>
</body>
</html>